package com.itheima.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.domain.Admin;
import com.itheima.mapper.AdminMapper;
import com.itheima.service.IAdminService;
import org.apache.dubbo.config.annotation.DubboService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 后台用户表 服务实现类
 * </p>
 *
 * @author fukeke
 * @since 2022-11-11
 */
@DubboService
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements IAdminService {
    @Autowired
    AdminMapper adminMapper;

    @Override
    public Admin findByUsername(String username) {

        LambdaQueryWrapper<Admin> qw=new LambdaQueryWrapper<>();
        qw.eq(Admin::getUsername,username);

        return  adminMapper.selectOne(qw);
    }
}
